package com.hanrentong.dp.abstractfactory;


/**
 * 抽象工厂：AbastractFactory
 * 抽象产品：Vehicle Weapon Food
 * 实际工厂：ModernFactory 利用实际产品生产产品族
 */
public class Main {
    public static void main(String[] args) {
        AbastractFactory f = new ModernFactory();

        Vehicle c = f.createVehicle();
        c.go();
        Weapon w = f.createWeapon();
        w.shoot();
        Food b = f.createFood();
        b.printName();
    }
}
